﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace TulingMember.Database.Migrations.Migrations
{
    public partial class updatetabledepartment : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<long>(
                name: "ParentId",
                table: "cts_Department",
                type: "bigint",
                nullable: false,
                defaultValue: 0L,
                oldClrType: typeof(long),
                oldType: "bigint",
                oldNullable: true);

            migrationBuilder.AddColumn<string>(
                name: "ParentIds",
                table: "cts_Department",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.UpdateData(
                table: "Role",
                keyColumn: "Id",
                keyValue: 142307070910554L,
                column: "CreatedTime",
                value: new DateTimeOffset(new DateTime(2023, 6, 12, 14, 21, 58, 292, DateTimeKind.Unspecified).AddTicks(3166), new TimeSpan(0, 8, 0, 0, 0)));

            migrationBuilder.UpdateData(
                table: "Security",
                keyColumn: "Id",
                keyValue: 142307070910555L,
                column: "CreatedTime",
                value: new DateTimeOffset(new DateTime(2023, 6, 12, 14, 21, 58, 292, DateTimeKind.Unspecified).AddTicks(4253), new TimeSpan(0, 8, 0, 0, 0)));

            migrationBuilder.UpdateData(
                table: "Security",
                keyColumn: "Id",
                keyValue: 142307070910556L,
                column: "CreatedTime",
                value: new DateTimeOffset(new DateTime(2023, 6, 12, 14, 21, 58, 292, DateTimeKind.Unspecified).AddTicks(4262), new TimeSpan(0, 8, 0, 0, 0)));

            migrationBuilder.UpdateData(
                table: "Security",
                keyColumn: "Id",
                keyValue: 142307070910557L,
                column: "CreatedTime",
                value: new DateTimeOffset(new DateTime(2023, 6, 12, 14, 21, 58, 292, DateTimeKind.Unspecified).AddTicks(4264), new TimeSpan(0, 8, 0, 0, 0)));

            migrationBuilder.UpdateData(
                table: "User",
                keyColumn: "Id",
                keyValue: 142307070910551L,
                column: "CreatedTime",
                value: new DateTimeOffset(new DateTime(2023, 6, 12, 14, 21, 58, 293, DateTimeKind.Unspecified).AddTicks(4843), new TimeSpan(0, 8, 0, 0, 0)));
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "ParentIds",
                table: "cts_Department");

            migrationBuilder.AlterColumn<long>(
                name: "ParentId",
                table: "cts_Department",
                type: "bigint",
                nullable: true,
                oldClrType: typeof(long),
                oldType: "bigint");

            migrationBuilder.UpdateData(
                table: "Role",
                keyColumn: "Id",
                keyValue: 142307070910554L,
                column: "CreatedTime",
                value: new DateTimeOffset(new DateTime(2023, 6, 10, 18, 22, 58, 367, DateTimeKind.Unspecified).AddTicks(6571), new TimeSpan(0, 8, 0, 0, 0)));

            migrationBuilder.UpdateData(
                table: "Security",
                keyColumn: "Id",
                keyValue: 142307070910555L,
                column: "CreatedTime",
                value: new DateTimeOffset(new DateTime(2023, 6, 10, 18, 22, 58, 367, DateTimeKind.Unspecified).AddTicks(7358), new TimeSpan(0, 8, 0, 0, 0)));

            migrationBuilder.UpdateData(
                table: "Security",
                keyColumn: "Id",
                keyValue: 142307070910556L,
                column: "CreatedTime",
                value: new DateTimeOffset(new DateTime(2023, 6, 10, 18, 22, 58, 367, DateTimeKind.Unspecified).AddTicks(7364), new TimeSpan(0, 8, 0, 0, 0)));

            migrationBuilder.UpdateData(
                table: "Security",
                keyColumn: "Id",
                keyValue: 142307070910557L,
                column: "CreatedTime",
                value: new DateTimeOffset(new DateTime(2023, 6, 10, 18, 22, 58, 367, DateTimeKind.Unspecified).AddTicks(7366), new TimeSpan(0, 8, 0, 0, 0)));

            migrationBuilder.UpdateData(
                table: "User",
                keyColumn: "Id",
                keyValue: 142307070910551L,
                column: "CreatedTime",
                value: new DateTimeOffset(new DateTime(2023, 6, 10, 18, 22, 58, 368, DateTimeKind.Unspecified).AddTicks(3248), new TimeSpan(0, 8, 0, 0, 0)));
        }
    }
}
